import java.util.Scanner;

public class Dictionary01 {    
    public static void main(String[] args){
     
     Scanner scanner = new Scanner(System.in);
        String[] word = {"door", "house", "boy", "girl", "book", "car", "pen", "tree"};
        String[] meaning = {"baabun", "baytun", "waladun", "bintun", "kitaabun", "sayyaratun", "qalamun", "shajaratun"};
        
        System.out.println("The English-Arabic dictionary contains the following words: ");
        for(int k = 0; k < word.length; k++)
         System.out.print(word[k] + "  ");
         
        System.out.println("\n\nEnter an English word to translate into Arabic: ");
        String inputWord = scanner.next();
        
        boolean found = false;
        for(int k = 0; k < word.length; k++){
          if(word[k].equalsIgnoreCase(inputWord)){
            System.out.println("\nThe translation of the word: " + inputWord + " is: " + meaning[k]);
            found = true;
            break;
          }
        }
        
        if(! found)
         System.out.println("Sorry! The word " + inputWord + " does not exist in the dictionary");
    }    
}
